package frontend.components.base;

import frontend.components.other.UserInputCallableAction;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;

public class DeleteButtonComponent extends Panel {

    public DeleteButtonComponent(String propertyId, final UserInputCallableAction action) {
        super(propertyId);
        AjaxButton saveButton = new AjaxButton("button") {
            @Override
            protected void onSubmit(final AjaxRequestTarget target, Form<?> form) {
               action.call(target, null);
            }
        };
    }
}
